/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package alcatelparser.modules;

import alcatelparser.tags.ITags;
import java.lang.reflect.Field;
import java.util.HashMap;

/**
 *
 * @author geniuz
 */
public class RedTag2TagID extends HashMap
{

    private RedTag2TagID()
    {
        populateMap();
    }

    public static final RedTag2TagID getInstance()
    {
        if(_instance == null)
            try
            {
                _instance = new RedTag2TagID();
            }
            catch(Exception applicationinitalyzeerror)
            {
                System.out.println(I.I(3974));
            }
        return _instance;
    }

    public static final void initialyze()
    {
        _instance = new RedTag2TagID();
    }

    private void populateMap()
    {
        Field afield[] = ITags.class.getFields();
        Field afield1[] = afield;
        int i = afield1.length;
        for(int j = 0; j < i; j++)
        {
            Field field = afield1[j];
            try
            {
                String s = (String)field.get(this);
                String s1 = ResultTagNames.getTagProperties().getProperty(s);
                put(s1, s);
            }
            catch(IllegalAccessException illegalaccessexception)
            {
                //throw new ApplicationInitalyzeError(I.I(3948));
            }
        }

    }

    private static RedTag2TagID _instance;
}
